package cc.jq1024.infrastructure.persistent.dao;

import cc.jq1024.infrastructure.persistent.po.RaffleActivityAccountDayPO;
import cc.jq1024.router.annotation.DBRouter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 抽奖活动账户表-日次数 Mapper 接口
 * </p>
 *
 * @author lijiaqiang@ljq1024.cc
 * @since 2024-04-28
 */
@Mapper
public interface IRaffleActivityAccountDayDao extends BaseMapper<RaffleActivityAccountDayPO> {

    /** 查询日额度
     *  */
    @DBRouter
    RaffleActivityAccountDayPO queryActivityAccountDayByUserId(RaffleActivityAccountDayPO raffleActivityAccountDayReq);

    /** 更新日额度 */
    int updateActivityAccountDaySubtractionQuota(RaffleActivityAccountDayPO activityAccountDayReq);

    /** 插入一条日额度记录 */
    void insertActivityAccountDay(RaffleActivityAccountDayPO raffleActivityAccountDayReq);

    /** 查询活动账户 - 日，参与次数 */
    @DBRouter
    Integer queryRaffleActivityAccountDayPartakeCount(RaffleActivityAccountDayPO raffleActivityAccountDay);

    /** 更新账户 - 日 */
    int addAccountQuota(RaffleActivityAccountDayPO raffleActivityAccountDay);
}
